function Editor(id){
    this.id = id;
    this.editor;
    this.html;
}

Editor.prototype = {

    init: function(){
        var E = window.wangEditor;
        this.editor = new E('#' + this.id);
        this.editor.customConfig.onchange = function (html) {
            // html 即变化之后的内容
            this.html = html;
        };
        this.editor.customConfig.uploadImgServer = '/upload';
        this.editor.customConfig.uploadImgMaxLength = 5;
        this.editor.create();
    },
    getHtml: function(){
        return this.editor.txt.html();
    },
    clearEditor: function(){
        this.editor.txt.clear();
    },
    setHtml: function(val){
        this.editor.txt.html(val);
    }
};